package com.ytclub.auth.common.enums;

import lombok.Getter;

/**
 * 用户账号状态枚举类
 *
 * @author: HuangQi
 * @date: Created in 20:44 2023/12/16
 * @description: 用户账号状态枚举
 */
@Getter
public enum AuthUserStatusEnum {
    OPEN(0, "启用"),
    CLOSE(1, "禁用");

    public int code;

    public String desc;

    AuthUserStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AuthUserStatusEnum getByCode(int codeVal) {
        for (AuthUserStatusEnum isDeletedFlagEnum : AuthUserStatusEnum.values()) {
            if (isDeletedFlagEnum.code == codeVal) {
                return isDeletedFlagEnum;
            }
        }
        return null;
    }


}
